To provide convenience to users, conventional electronic devices are configured to display various notification information, such as short messages and instant communication information, while screens of the devices are locked in a lockscreen state. However, the notification information may be revealed to people other than the owner of an electronic device, who may also see such notification information in the lockscreen state.
To prevent the notification information from leakage, the electronic device may allow the user to set a display mode of the notification information in the lockscreen state according to the user's need. For instance, the display modes can include displaying contents of the notification information or only the prompt that the notification information is received, or not displaying the notification information at all.